dividing a quantity in the given ratio